'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
    */
    await queryInterface.bulkInsert("Tags", [
      { name: 'JavaScript', createdAt: new Date(), updatedAt: new Date() },
      { name: 'Node.js', createdAt: new Date(), updatedAt: new Date() },
      { name: 'React', createdAt: new Date(), updatedAt: new Date() },
      { name: 'Vue.js', createdAt: new Date(), updatedAt: new Date() },
      { name: 'HTML/CSS', createdAt: new Date(), updatedAt: new Date() },
      { name: '数据库', createdAt: new Date(), updatedAt: new Date() },
      { name: 'Python', createdAt: new Date(), updatedAt: new Date() },
      { name: 'Go', createdAt: new Date(), updatedAt: new Date() },
      { name: 'PHP', createdAt: new Date(), updatedAt: new Date() },
      { name: 'Docker', createdAt: new Date(), updatedAt: new Date() },
      { name: '云计算', createdAt: new Date(), updatedAt: new Date() },
      { name: 'AI/机器学习', createdAt: new Date(), updatedAt: new Date() },
      { name: '算法', createdAt: new Date(), updatedAt: new Date() },
      { name: '大数据', createdAt: new Date(), updatedAt: new Date() },
      { name: '区块链', createdAt: new Date(), updatedAt: new Date() },
    ])
  },

  async down (queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
    await queryInterface.bulkDelete('Tags', null, {})
  }
};
